import Fetch from '../../utils/fetch'

const app = getApp<IAppOption>()

Page({
  data: {
    list: [],
  },

  async onLoad() {
    const res = await Fetch('http://musicapi.leanapp.cn/top/playlist?cat=华语');
    console.log(res.data);
    this.setData({ list: res.data.playlists })
  },

  handleClick(e: any) {
    wx.navigateTo({
      url: `../detail/detail?id=${e.currentTarget.dataset.id}`,
    })
  },

})
